//缴费账单模块
//添加缴费记录
import {transfer} from "./axiosApi";

export function addPayment({companyUuid, type, amount}) {
    return transfer({
        url: '/Payment/add',
        method: 'post',
        data: {companyUuid, type, amount},
    })
}

//修改缴费记录
export function updatePayment(data) {
    return transfer({
        url: '/Payment/update',
        method: 'post',
        // data: {uuid, companyUuid, type, amount},
        data
    })
}

//查询缴费记录
export function queryPayment({page, size, start, end, condition}) {
    return transfer({
        url: '/Payment/page',
        method: 'post',
        data: {page, size, start, end, condition},
    })
}

//删除缴费
export function delectPayment(id) {
    return transfer({
        url: '/Payment/del',
        params: {id},
    })
}

//查询账单
export function QueryBill({page, size, condition}) {
    return transfer({
        url: 'Bill/page',
        method: 'post',
        data: {page, size, condition}
    })
}

//修改账单
export function UpdateBill({uuid, companyUuid, type, month, amount, unitPrice, remark, priceConstruction}) {
    return transfer({
        url: 'Bill/update',
        method: 'post',
        data: {uuid, companyUuid, type, month, amount, unitPrice, remark, priceConstruction}
    })
}

//添加账单
export function AddBill({companyUuid, type, month, amount, unitPrice, remark, priceConstruction}) {
    return transfer({
        url: 'Bill/add',
        method: 'post',
        data: {companyUuid, type, month, amount, unitPrice, remark, priceConstruction}
    })
}

//删除账单
export function delectBill(id) {
    return transfer({
        url: '/Bill/del',
        params: {id},
    })
}

//查询余额情况
export function getBalance(data) {
    return transfer({
        url: '/Company/getBalance',
        method: 'post',
        data
    })
} //水电统计
export function BillStatistics(params) {
    return transfer({
        url: '/Bill/statistics',
        params,
    })
}